package cn.yl.conSumerHystrix.service;

import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class ProviderHystrixServiceFactory  implements FallbackFactory<ProviderService> {

    @Override
    public ProviderService create(Throwable throwable) {
        return new ProviderService() {
            String msg="系统异常------%祭天%！！！";
            @Override
            public String getHystrixOK() {
                return msg;
            }

            @Override
            public String providerHystrixTimeOut() {
                return msg;
            }

            @Override
            public String providerOrder(Long id) {
                return msg;
            }
        };
    }
}
